package com.molichuxing.services.infrastructure.service;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.infrastructure.dto.request.create.InvoiceApplyCreateDto;
import com.molichuxing.services.infrastructure.dto.request.create.InvoiceInfoCreateDto;
import com.molichuxing.services.infrastructure.dto.response.InvoiceInfoDto;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 发票申请 服务类
 * </p>
 *
 * @author zhaopenghui
 * @since 2019-09-20
 */
public interface InvoiceInfoService extends RootService {


    /**
     * 获取发票列表
     *
     * @param map      key:status Integer 发票状态
     *                 key:invoiceApplyIdList List 发票申请id
     *                 key：businessType Integer 业务类型
     *                 key:startApplyTime LocalDateTime 申请开始时间
     *                 key:endApplyTime LocalDateTime 申请结束时间
     * @param pageNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    public Paged<InvoiceInfoDto> getInvoiceInfoPage(Map<String, Object> map, Integer pageNum, Integer pageSize) throws Exception;

    /**
     * 根据状态获取发票数量
     *
     * @return
     * @throws Exception
     */
    public Map<Integer, Integer> getInvoiceCountByStatus() throws Exception;

    /**
     * 修改发票状态
     *
     * @param invoiceInfoId
     * @return
     * @throws Exception
     */
    public Boolean modifyInvoiceStatus(Integer invoiceInfoId, Integer status) throws Exception;

    /**
     * 发票申请
     *
     * @param list
     * @return
     * @throws Exception
     */
    public Boolean createInvoiceInfoBatch(List<InvoiceInfoCreateDto> list) throws Exception ;

}
